﻿using _220105BookSys.Dto.BookType;
using _220105BookSys.Model;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace _220105BookSys.api.Profiles
{
    public class BookTypeProfile : Profile
    {
        public BookTypeProfile()
        {
            CreateMap<BookType, BookTypeDto>();
            CreateMap<BookTypeDtoForCreatation, BookType>().ForMember(destinationMember => destinationMember.Id,memberOptions=>memberOptions.MapFrom(sourceMember=>Guid.NewGuid()));
        }
    }
}
